{template 'weheader'}
{if $reside}<script src="{MODULE_URL}template/weui/js/city-picker.min.js"></script>{/if}
{if $isloc}<script type="text/javascript" src="{TEMPLATE_WEUI}js/QQgetLocation.js"></script>{/if}
<link rel="stylesheet" href="{MODULE_URL}template/weui/style/post.css">
<style>

.weui_msg .weui_extra_area {margin-bottom: 5px;}
.weui_extra_area {z-index:0;}
.record .weui_cells:first-child {margin-top:30px;}
.record .weui_cells {margin:0;}
.record img{width:1.2rem;height:1.2rem;}

.weui_uploader_file {text-align:center;
  float: left;
  margin-right: 9px;
  margin-bottom: 9px;
  width: auto;
  height: 100px;
  background: no-repeat center center;
  background-size: 100px auto;
  padding:100px auto;}
.m-img {background-position: top center;padding-bottom: 0;}
.m-img img{width:100%;height:auto;}
.m-masker {background-color: rgba(0, 0, 0, 0);position: relative;}
</style>
{if !empty($par['comment']) && pdo_tableexists('dayu_comment')}
<div class="weui_navbar" style="height:44px;">
	<div class="weui_navbar_item">
		提交
	</div>
	<div class="weui_navbar_item">
		评论 <span class="ico_scored middle"><strong class="score_5"></strong></span>
	</div>
</div>
<div class="weui_tab_bd">
<div class="weui_tab_bd_item">
{else}
<div class="weui_tab_bd">
{/if}
	{if $activity['content']}
	<div class="weui-weixin">
		<div class="weui-weixin-ui">
			<div class="weui-weixin-page">
				<h2 class="weui-weixin-title f-green tcenter">{$activity['title']}</h2>
				<div class="weui-weixin-info">
				{if !empty($activity['agreement'])}
					<span class="weui-weixin-em">{$activity['agreement']}</span>
				{/if}
				</div>
				{if $par['header']==1}
				<div class="weui-weixin-img">
					<img src="{$activity['thumb']}">
				</div>     
				{/if}        
				<div class="weui-weixin-content">
					{php echo htmlspecialchars_decode($activity['content'])}
				</div>
			</div>
		</div>
	</div> 
	{/if}
	{if $activity['isinfo']}
		{template 'insert/field_address'}
	{/if}

<form action="{php echo $this->createMobileUrl('dayu_form', array('weid' => $_W['uniacid'], 'id' => $reid))}" class="" enctype="multipart/form-data" method="POST" id="form">
<input type="hidden" name="repeat" value="<?php echo md5(sha1(time())); ?>">

	{if $activity['paixu']==0}
		{template 'insert/join'}
	{/if}
	
	{if !empty($par['kami']) && pdo_tableexists('dayu_kami')}
		{template 'insert/field_kami'}
	{/if}
	
	{if !empty($linkage)}
		{template 'insert/field_linkage'}
	{/if}
	
	<div class="weui_cells weui_cells_form">
	<div class="fields">
	
	{loop $ds $fields}
	
	{if in_array($fields['type'], array('text', 'phone', 'tel', 'idcard'), TRUE)}
		{template 'insert/field_text'}
	{/if}
	
	{if $fields['type'] == 'photograph'}
		{template 'insert/field_photograph'}
	{/if}
		
	{if $fields['type'] == 'email'}
		{template 'insert/field_email'}
	{/if}
				
	{if $fields['type'] == 'number'}
		{template 'insert/field_number'}
	{/if}
				
	{if $fields['type'] == 'textarea'}
		{template 'insert/field_textarea'}
	{/if}
				
	{if $fields['type'] == 'radio'}
		{template 'insert/field_radio'}
	{/if}
				
	{if $fields['type'] == 'checkbox'}
		{template 'insert/field_checkbox'}
	{/if}
						
	{if $fields['type'] == 'select'}
		{template 'insert/field_select'}
	{/if}

	{if $fields['type'] == 'image'}
		{template 'insert/field_image'}
	{/if}
		
	{if $fields['type'] == 'calendar'}
		{template 'insert/field_calendar'}
	{/if}
		
	{if $fields['type'] == 'range'}
		{template 'insert/field_range'}
	{/if}
		
	{if $fields['type'] == 'reside'}
		{template 'insert/field_reside'}
	{/if}
	{/loop}
	</div>
	</div>
	
	{if $activity['plural']==1}
		{template 'insert/pics'}
	{/if}
	
	{if $activity['isvoice']==1}
		{template 'insert/voice'}
	{/if}
	
	{if $activity['paixu']==1}
		{template 'insert/join'}
	{/if}
	
    <div class="weui_btn_area row">
	{if !empty($activity['agreement'])}
		{template 'insert/field_agreement'}
	{/if}
		{template 'insert/field_var'}
		<input type="hidden" name="token" value="{$_W['token']}" />
        <button class="weui_btn {$btncolor}" name="submit" type="submit" id="formSubmitBtn">{$submitname}</button>
    </div>
</form>
	{template 'insert/field_footer'}
	{if !empty($par['comment']) && pdo_tableexists('dayu_comment')}
	</div>
        <div class="weui_tab_bd_item">
            {template 'insert/comment'}
        </div>
	{/if}
</div>
	{template 'insert/popup'}
	
	{template 'insert/script'}
{template 'footers'}